using System;
using System.Data;
using System.Data.SqlClient;

/// <summary>
/// A class that represents a Cmdlet
/// </summary>
public class PsSpecCmdlet : IPsSpecDataReader
{
    public PsSpecCmdlet() { }

    public void Initialize(SqlDataReader reader, System.Collections.Generic.Dictionary<string, Int32> columnMappings)
    {
        SqlUtils.ElementConverter<String> stringConverter = StringConverter;

        this.cmdletId = reader.GetInt32(columnMappings["Id"]);
        this.snapin = reader[columnMappings["Snapin"]] as string;
        this.verb = reader[columnMappings["Verb"]] as string;
        this.noun = reader[columnMappings["Noun"]] as string;
        this.project = reader[columnMappings["Project"]] as string;
        this.shortDescription = reader[columnMappings["ShortDescription"]] as string;
        this.longDescription = reader[columnMappings["LongDescription"]] as string;
        this.supportsShouldProcess = reader.GetBoolean(columnMappings["SupportsShouldProcess"]);
        this.notes = reader[columnMappings["Notes"]] as string;
        this.specExamples = reader[columnMappings["SpecExamples"]] as string;
        this.outputObject = reader[columnMappings["OutputObject"]] as string;
        this.outputObjectDescription = reader[columnMappings["OutputObjectDescription"]] as string;
        this.relatedTo = reader[columnMappings["RelatedTo"]] as string;
        this.defaultParameterSetName = reader[columnMappings["DefaultParameterSetName"]] as string;
        this.custom1 = reader[columnMappings["Custom1"]] as string;
        this.custom2 = reader[columnMappings["Custom2"]] as string;
        this.custom3 = reader[columnMappings["Custom3"]] as string;
        this.custom4 = reader[columnMappings["Custom4"]] as string;
        this.status = reader[columnMappings["Status"]] as string;
        this.helpStatus = reader[columnMappings["HelpStatus"]] as string;
        this.helpShortDescription = reader[columnMappings["HelpShortDescription"]] as string;
        this.helpLongDescription = reader[columnMappings["HelpLongDescription"]] as string;
        this.inputObject = reader[columnMappings["InputObject"]] as string;
        this.helpInputObjectDescription = reader[columnMappings["HelpInputObjectDescription"]] as string;
        this.helpOutputObjectDescription = reader[columnMappings["HelpOutputObjectDescription"]] as string;
        this.helpAdditionalNotes = reader[columnMappings["HelpAdditionalNotes"]] as string;
        this.teamMembers = reader[columnMappings["TeamMembers"]] as string;
    }

    public int Id
    {
        get { return cmdletId; }
        set { cmdletId = value; }
    }
    private int cmdletId;

    public string Snapin
    {
        get { return snapin; }
        set { snapin = value; }
    }
    private string snapin;

    public string Verb
    {
        get { return verb; }
        set { verb = value; }
    }
    private string verb;

    public string Noun
    {
        get { return noun; }
        set { noun = value; }
    }
    private string noun;

    public string ProjectName
    {
        get { return project; }
        set { project = value; }
    }
    private string project;

    public string TeamMembers
    {
        get { return teamMembers; }
        set { teamMembers = value; }
    }
    private string teamMembers;

    public string ShortDescription
    {
        get { return shortDescription; }
        set { shortDescription = value; }
    }
    private string shortDescription;

    public string LongDescription
    {
        get { return longDescription; }
        set { longDescription = value; }
    }
    private string longDescription;

    public bool SupportsShouldProcess
    {
        get { return supportsShouldProcess; }
        set { supportsShouldProcess = value; }
    }
    private bool supportsShouldProcess;

    public string Notes
    {
        get { return notes; }
        set { notes = value; }
    }
    private string notes;

    public String SpecExamples
    {
        get
        {
            return specExamples;
        }
        set
        {
            specExamples = value;
        }
    }
    private string specExamples;

    public String OutputObject
    {
        get
        {
            return outputObject;
        }
        set
        {
            outputObject = value;
        }
    }
    private string outputObject;

    public String OutputObjectDescription
    {
        get
        {
            return outputObjectDescription;
        }
        set
        {
            outputObjectDescription = value;
        }
    }
    private string outputObjectDescription;

    public String RelatedTo
    {
        get
        {
            return relatedTo;
        }
        set
        {
            relatedTo = value;
        }
    }
    private string relatedTo;

    public String DefaultParameterSetName
    {
        get { return defaultParameterSetName; }
        set { defaultParameterSetName = value; }
    }
    private string defaultParameterSetName;

    public String Custom1
    {
        get { return custom1; }
        set { custom1 = value; }
    }
    private string custom1;

    public String Custom2
    {
        get { return custom2; }
        set { custom2 = value; }
    }
    private string custom2;

    public String Custom3
    {
        get { return custom3; }
        set { custom3 = value; }
    }
    private string custom3;

    public String Custom4
    {
        get { return custom4; }
        set { custom4 = value; }
    }
    private string custom4;

    public String Status
    {
        get { return status; }
        set { status = value; }
    }
    private string status;

    public String HelpStatus
    {
        get { return helpStatus; }
        set { helpStatus = value; }
    }
    private string helpStatus;

    public String HelpShortDescription
    {
        get { return helpShortDescription; }
        set { helpShortDescription = value; }
    }
    private string helpShortDescription;

    public String HelpLongDescription
    {
        get { return helpLongDescription; }
        set { helpLongDescription = value; }
    }
    private string helpLongDescription;

    public String InputObject
    {
        get { return inputObject; }
        set { inputObject = value; }
    }
    private string inputObject;

    public String HelpInputObjectDescription
    {
        get { return helpInputObjectDescription; }
        set { helpInputObjectDescription = value; }
    }
    private string helpInputObjectDescription;

    public String HelpOutputObjectDescription
    {
        get { return helpOutputObjectDescription; }
        set { helpOutputObjectDescription = value; }
    }
    private string helpOutputObjectDescription;

    public String HelpAdditionalNotes
    {
        get { return helpAdditionalNotes; }
        set { helpAdditionalNotes = value; }
    }
    private string helpAdditionalNotes;

    private String StringConverter(string input) { return input; }
}
